<%-- $Id: artistDisplay.jsp 248 2007-03-09 12:09:03Z huijzer $ --%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<html>

	<head>
		<title>Artist :: Display</title>
		<meta name="object" content="artist">
	</head>

	<body>

		<div id="apphead">
			<h2>Artist :: <em>Display</em></h2>
		</div>

		<div id="projecthome" class="app">

			<div id="axial" class="h3">
				<h3>Info</h3>
				<div class="axial">
					<table border="0" cellspacing="2" cellpadding="3">
						<tr>
							<th>Id</th>
							<td>${artist.id}</td>
						</tr>
						<tr>
							<th>Name</th>
							<td>${artist.name}</td>
						</tr>
					</table>
				</div>
			</div>
			
			<br/>
			
			<div class="h3">
				<h3>${fn:length(artist.discs)} Discs</h3>
				<table border="1" cellspacing="2" cellpadding="3" width="100%">
					<tr>
						<th width="40">&nbsp;</th>
						<th>Year</th>
						<th>Title</th>
						<th>AMG Rating</th>
						<th>Actions</th>						
					</tr>
					<c:forEach items="${artist.discs}" var="disc" varStatus="status">
						<tr class="${status.count % 2 == 0 ? 'b' : 'a'}">
							<td width="40">
								<c:if test="${not empty disc.cover}">
									<img width="40" height="40" src="<c:url value="/admin/discCoverDisplay.action?id=${disc.id}"/>"/>
								</c:if>
							</td>
							<td>${disc.year}</td>
							<td>
								<a href="<c:url value="/admin/discDisplay.action?id=${disc.id}"/>">${disc.title}</a>
								<c:forEach items="${disc.types}" var="type">
									&nbsp;<img src="<c:url value="/image/${type.description}.png"/>" align="bottom"/>
								</c:forEach>
							</td>
							<td>							
								<c:if test="${not empty disc.amgRating}">
									<img src="<c:url value="/image/${disc.amgRating}.gif"/>"/>
								</c:if>
							</td>
							<td>
								<a href="<c:url value="/admin/discEdit.action?id=${disc.id}"/>">edit</a>
								<a href="<c:url value="/admin/discExport.action?id=${disc.id}"/>">export</a>
							</td>
						</tr>
					</c:forEach>
				</table>
			</div>
			
			<br/>
			
			<c:if test="${not empty artist.links}">
				<div class="h3">
					<h3>${fn:length(artist.links)} Links</h3>
					<table border="1" cellspacing="2" cellpadding="3" width="100%">
						<tr>
							<th>Title</th>
							<th>URL</th>					
						</tr>
						<c:forEach items="${artist.links}" var="link" varStatus="status">
							<tr class="${status.count % 2 == 0 ? 'b' : 'a'}">
								<td><a href="<c:url value="/admin/linkDisplay.action?id=${link.id}"/>">${link.title}</a></td>
								<td><a href="${link.url}">${link.url}</a></td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</c:if>

		</div>

	</body>

</html>
